using System.IO;
using System.Web.Hosting;

namespace Common.Core
{
	public static class Pathing
	{
		public static string ResolvePath( string filePath )
		{
			// First check with HostingEnvironment:
			string path = HostingEnvironment.MapPath( filePath ),
					result = path ?? ( Path.IsPathRooted( filePath ) ? filePath : Path.GetFullPath( filePath ) );
			return result;
		}
	}
}